<?
		include("dbconn.inc");
		include("dbfuc.inc");
		include("session.inc");		
		$randam= rand(5, 100000);
		$_SESSION["session_pointtransfer_random"]=$randam;
		$adminuser=$_SESSION["adminuser"];
		$adminid=$_SESSION["adminid"];
		$admindb=$_SESSION["admindb"];
		
	if(session_is_registered("admindb") )
	{
		if(($adminuser!="") && (($adminid!="") || ($adminid!=0)))
		{	

			$sql="";$name="";$id="";

?>
<html>
<head>
<title>Allot Coupons</title>
<script language="JavaScript">
function check()
{
	if(document.form.from.value=="")
	{
		alert("Enter Starting Serial Number");
		document.form.from.focus();
		return false;
	}
	if(document.form.to.value=="")
	{
		alert("Enter Ending Serial Number");
		document.form.to.focus();
		return false;
	}
	return true;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<? include "allheader.php"  ?>	

<form name="form" action="coupon_view.php" method="post">
<br>
<br>
<br>
<br>
<table width="500" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#659931" bgcolor="#F8FDE3">
  <tr>
    <td colspan="3" bgcolor="#BDDF9C"><strong><font size="2" face="Arial, Helvetica, sans-serif">Enter the Details for Coupon Allotment </font></strong></td>
    </tr>
  <tr>
    <td width="161" rowspan="2"><strong><font size="2" face="Arial, Helvetica, sans-serif">Coupon 
      Serial Number : </font></strong></td>
    <td width="79"><strong><font size="2" face="Arial, Helvetica, sans-serif">From</font></strong></td>
    <td width="244"><strong><font size="2" face="Arial, Helvetica, sans-serif">
      <input name="from" type="text" id="from" size="6">
    </font></strong></td>
  </tr>
  <tr>
    <td><strong><font size="2" face="Arial, Helvetica, sans-serif">To</font></strong></td>
    <td><strong><font size="2" face="Arial, Helvetica, sans-serif">
      <input name="to" type="text" id="to" size="6">
    </font></strong></td>
  </tr>
  <tr>
    <td height="30" valign="middle"><strong><font size="2" face="Arial, Helvetica, sans-serif">Username : </font></strong></td>
    <td colspan="2"><strong><font size="2" face="Arial, Helvetica, sans-serif">
      <input name="textusername" type="text" id="textusername" size="30" maxlength="30">
    </font></strong></td>
  </tr>
  <tr>
    <td height="40" colspan="3"><div align="center">
      <input type="submit" name="Submit" value="Submit" onClick="return check();">
    </div></td>
    </tr>
</table>
<br>
        <br>
        <br>
</form>
</body>
</html>
<?

	}
	}
	else
	{
		$errormsg="Your session is expeired. Please login again.";
		header("location: index.php?error=$errormsg");
	}
?>